﻿CREATE TABLE [fact].[TrialBalance] (
    [EffectiveDate]                 DATE            NOT NULL,
    [LegalEntityId]                 INT             NOT NULL,
    [AccountId]                     SMALLINT        NOT NULL,
    [BalanceSign]                   SMALLINT        NOT NULL,
    [TotalBalanceSign]              SMALLINT        NOT NULL,
    [StratusBalanceGBP]             NUMERIC (28, 2) NULL,
    [StratusFixupBalanceGBP]        NUMERIC (28, 2) NULL,
    [FinanceBalanceGBP]             NUMERIC (28, 2) NULL,
    [CostControlBalanceGBP]         NUMERIC (28, 2) NULL,
    [ProductControlBalanceGBP]      NUMERIC (28, 2) NULL,
    [EliminationBalanceGBP]         NUMERIC (28, 2) NULL,
    [BalanceGBP]                    NUMERIC (28, 2) NOT NULL,
    [TotalStratusBalanceGBP]        NUMERIC (28, 2) NULL,
    [TotalStratusFixupBalanceGBP]   NUMERIC (28, 2) NULL,
    [TotalFinanceBalanceGBP]        NUMERIC (28, 2) NULL,
    [TotalCostControlBalanceGBP]    NUMERIC (28, 2) NULL,
    [TotalProductControlBalanceGBP] NUMERIC (28, 2) NULL,
    [TotalEliminationBalanceGBP]    NUMERIC (28, 2) NULL,
    [TotalBalanceGBP]               NUMERIC (28, 2) NOT NULL,
    PRIMARY KEY CLUSTERED ([EffectiveDate] ASC, [LegalEntityId] ASC, [AccountId] ASC) WITH (ALLOW_PAGE_LOCKS = ON, ALLOW_ROW_LOCKS = ON, PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF, STATISTICS_NORECOMPUTE = OFF)
);

